// *** ADDED BY HEADER FIXUP ***
#include <wx/xml/xml.h>
// *** END ***
// *** ADDED BY HEADER FIXUP ***
#include <wx/event.h>
#include <wx/string.h>
#include <wx/window.h>
// *** END ***
/***************************************************************
 * Name:      ClientMain.h
 * Purpose:   Defines Application Frame
 * Author:    sleepiforest (248023406@qq.com)
 * Created:   2011-11-28
 * Copyright: sleepiforest (http://weibo.com/sleepiforest)
 * License:
 **************************************************************/

#ifndef CLIENTMAIN_H
#define CLIENTMAIN_H

//(*Headers(ClientFrame)
#include <wx/sizer.h>
#include <wx/menu.h>
#include <wx/textctrl.h>
#include <wx/panel.h>
#include <wx/frame.h>
#include <wx/statusbr.h>
//*)
#include <wx/socket.h>
#include "TextLog.h"
#include "AddQueryDlg.h"
#include "ConnectionDlg.h"

class ClientFrame: public wxFrame
{
    public:
        ClientFrame(wxWindow* parent);
        void Show();
        virtual ~ClientFrame();
    private:
		void OnSocketEvent(wxSocketEvent& event);
		void OnRead();
		void OnLost();
		void OnSetting(wxXmlNode *node);
		void OnRespond(wxXmlNode *node);
		void OnMessage(wxXmlNode *node);
		void SendString(wxString msg);
        //(*Handlers(ClientFrame)
        void OnQuit(wxCommandEvent& event);
        void OnAbout(wxCommandEvent& event);
        void OntxEditText(wxCommandEvent& event);
        //*)
		static const long SOCKET_ID;
        //(*Identifiers(ClientFrame)
        static const long ID_PANEL3;
        static const long ID_TEXTCTRL1;
        static const long ID_PANEL2;
        static const long ID_TEXTCTRL2;
        static const long ID_PANEL1;
        static const long idMenuQuit;
        static const long idMenuAbout;
        static const long ID_STATUSBAR1;
        //*)

        //(*Declarations(ClientFrame)
        wxTextCtrl* txEdit;
        wxPanel* Panel1;
        wxPanel* Panel3;
        wxStatusBar* StatusBar1;
        wxPanel* Panel2;
        TextLog* txLog;
        //*)
        wxString name,serverName;
        ConnectionDlg connectDlg;
        AddQueryDlg queryDlg;
		wxSocketBase* sock;
        DECLARE_EVENT_TABLE()
};

#endif // CLIENTMAIN_H
